import 'package:flutter/material.dart';

class GlobalState with ChangeNotifier {
  int _notificationCount = 0;
  int _messageCount = 0;

  int get notificationCount => _notificationCount;
  int get messageCount => _messageCount;

  // 更新 notificationCount
  void updateNotificationCount(int count) {
    _notificationCount = count;
    notifyListeners();  // 通知监听者更新
  }

  // 更新 messageCount
  void updateMessageCount(int count) {
    _messageCount = count;
    notifyListeners();  // 通知监听者更新
  }

    // 更新 messageCount
  void updateMessageDeleteOne() {
    _messageCount = _messageCount - 1;
    notifyListeners();  // 通知监听者更新
  }
}
